package com.zxp.cloud.goods.model;

import com.zxp.cloud.core.db.idgen.SnowflakeGenerator;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author shollin
 * @desc
 * @date 2021/7/20/020 12:38
 */
@Data
@Entity
public class Product implements Serializable {

    @Id
    @GenericGenerator(name="snowflake",strategy = SnowflakeGenerator.TYPE)
    @GeneratedValue(generator = "snowflake")
    private Long id;

    private String name; // 商品数量
    private BigDecimal price; // 价格
}
